package com.atguigu.web01.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * @author 杨林
 * @create 2023-08-29 9:54 星期二
 * description:
 */
@Controller
public class ViewTestController {
    
    
    @GetMapping("/toSuccess")
    public String success(Model model){
        //Model中的数据会被放在请求域中  requestSetAttribute("a",aa);
        model.addAttribute("msg","你好，thymeleaf");
        model.addAttribute("baidu","http://www.baidu.com");    
        return "success";
        
    }
    
}
